package com.sxtx.vk.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sxtx.vk.entity.UserEntity;
import com.sxtx.vk.service.UserService;

@Controller
public class TestController {
	
	@Autowired
	private UserService userService;

	@RequestMapping("index")
	public String goTest(ModelMap aa,HttpServletRequest request) {
		aa.put("text", "hello----");
		UserEntity user =userService.selectByPrimaryKey(21);
		request.setAttribute("user", user);
		return "test";
	}
	@RequestMapping("img")
	public String showimg(ModelMap aa,HttpServletRequest request) {
		aa.put("test", "水水水水不");
		aa.put("title", "五笔字根");
		return "showimg";
	}
}
